package com.blacktea.behavioralpatterns.visitorpattern;

import lombok.Data;

import java.math.BigDecimal;

/**
 * @description: 产品订单项类
 * @author: black tea
 * @date: 2023/3/26 22:39
 */
@Data
public class ProductOrderItem implements OrderItem {

    /**
     * 产品名称
     */
    private final String name;

    /**
     * 产品单价
     */
    private final BigDecimal price;

    /**
     * 产品数量
     */
    private final int quantity;

    @Override
    public void accept(OrderVisitor visitor) {
        visitor.visit(this);
    }
}